import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 14785
 * Date: 2025-07-05
 * Time: 22:39
 */
public class test {
    public static void main(String[] args) {

    }
    public static void main6(String[] args) {
        int n = 32422;
        int x = 1;
        int count = 0;
        while (x != 0) {
            if ((n & x) != 0)
                count++;
            x <<= 1;

        }

        System.out.println(count);
    }
    public static void main5(String[] args) {
        Scanner sc=new Scanner(System.in);
        while(sc.hasNextInt()){
            int a= sc.nextInt();
            int b= sc.nextInt();
            int c=0;
            while (b!=0){
                c=a%b;
                a=b;
                b=c;
                if(b==0)
                    System.out.println(a);

            }

        }
    }
    public static void main4(String[] args) {
        double sum=0;
        for (int i = 1; i <= 100; i++) {
            if (i%2==1)
                sum+=1.0/i;
            else
                sum-=1.0/i;

        }
        System.out.println(sum);
    }
    public static void main3(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        for (int i = 0; i <= n; i++) {
            int tmp=i;
            int count=0;
            while (tmp != 0) {
                count++;
                tmp/=10;
            }
            tmp=i;
            int sum=0;
            while (tmp != 0) {
                sum+=Math.pow(tmp%10,count);
                tmp/=10;
            }
            if (sum==i)
                System.out.println(i);
        }
    }
    public static void main2(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int flag=0;
        for (int i = 2; i < n; i++) {
            if(n%i==0)
                flag=1;
        }
        if(flag==0)
            System.out.println(n+"是素数");
        else
            System.out.println(n+"不是素数");
    }
    public static void main1(String[] args) {
        int num=0;
        for (int i = 1; i <= 100; i++) {
            if(i%10==9)
                num++;
            if(i/10==9)
                num++;

        }
        System.out.println(num);
    }
}
